package com.scmt.hmzd.entity;

import java.math.BigDecimal;
import com.baomidou.mybatisplus.annotation.IdType;

import java.util.ArrayList;
import java.util.Date;

import com.baomidou.mybatisplus.annotation.TableField;
import com.baomidou.mybatisplus.annotation.TableId;
import java.io.Serializable;
import java.util.List;

import com.baomidou.mybatisplus.annotation.TableLogic;
import com.fasterxml.jackson.annotation.JsonFormat;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;
import lombok.EqualsAndHashCode;
import org.springframework.format.annotation.DateTimeFormat;

/**
 * <p>
 *
 * </p>
 *
 * @author ycy
 * @since 2023-03-07
 */
@Data
@EqualsAndHashCode(callSuper = false)
@ApiModel(value="HmOrder对象", description="")
public class HmOrder implements Serializable {

    private static final long serialVersionUID = 1L;

    @ApiModelProperty(value = "主键")
    @TableId(value = "id", type = IdType.ASSIGN_UUID)
    private String id;

    @ApiModelProperty(value = "订单编号")
    private String orderNum;

    @ApiModelProperty(value = "订单金额")
    private BigDecimal orderPrice;

    @ApiModelProperty(value = "服务时长")
    private Integer timeLong;

    @ApiModelProperty(value = "项目id")
    private String projectId;

    @ApiModelProperty(value = "项目名称 多个以逗号分隔")
    private String projectName;

    @ApiModelProperty(value = "技师id")
    private String technicianId;

    @ApiModelProperty(value = "客户id")
    private String userId;

    @ApiModelProperty(value = "技师姓名")
    private String technicianName;


    @ApiModelProperty(value = "服务时间（客户预约时间）")
    @DateTimeFormat(pattern = "yyyy-MM-dd HH:mm")
    private Date serviceTime;

    @ApiModelProperty(value = "车费费用")
    private BigDecimal carMoney;

    @ApiModelProperty(value = "车费详情")
    private String carInfo;

    @ApiModelProperty(value = "支付状态 0未支付 1已支付 2技师接单 3服务完成 -1支付失败")
    private Integer status;

    @ApiModelProperty(value = "订单备注")
    private String remark;

    @ApiModelProperty(value = "用户订单地址Id")
    private Long addrOrderId;

    @ApiModelProperty(value = "是否升级项目 1是0否")
    private Integer isUp;

    @ApiModelProperty(value = "优惠金额")
    private BigDecimal discountPrice;

    @ApiModelProperty(value = "删除状态")
    @TableLogic
    private Integer delFlag;

    @ApiModelProperty(value = "是否已评论")
    private Integer isComment;

    @ApiModelProperty(value = "收件人姓名")
    private String receiverName;

    @ApiModelProperty(value = "收件人电话")
    private String receiverMobile;

    @ApiModelProperty(value = "下单时间")
    @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss")
    @DateTimeFormat(pattern = "yyyy-MM-dd HH:mm:ss")
    private Date createTime;
    @ApiModelProperty(value = "付款时间")
    @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss")
    @DateTimeFormat(pattern = "yyyy-MM-dd HH:mm:ss")
    private Date payTime;
    @ApiModelProperty(value = "接单时间")
    @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss")
    @DateTimeFormat(pattern = "yyyy-MM-dd HH:mm:ss")
    private Date dvyTime;
    @ApiModelProperty(value = "到达时间")
    @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss")
    @DateTimeFormat(pattern = "yyyy-MM-dd HH:mm:ss")
    private Date arrivalTime;
    @ApiModelProperty(value = "结束时间")
    @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss")
    @DateTimeFormat(pattern = "yyyy-MM-dd HH:mm:ss")
    private Date endTime;
    @ApiModelProperty(value = "开始时间")
    @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss")
    @DateTimeFormat(pattern = "yyyy-MM-dd HH:mm:ss")
    private Date startTime;

    @ApiModelProperty(value = "技师出发时间")
    @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss")
    @DateTimeFormat(pattern = "yyyy-MM-dd HH:mm:ss")
    private Date outTime;

    @ApiModelProperty(value = "是否结算")
    private Integer isSettled;
    @ApiModelProperty(value = "金额结算时间")
    private Date settledTime;

    @ApiModelProperty(value = "支付单号 微信回调")
    private String payNumber;

    @ApiModelProperty(value = "是否推送公众号消息")
    private Integer isSendMsg;

    @ApiModelProperty(value = "微信支付成功后支付单号")
    private String redPackOrderNumber;

    @ApiModelProperty(value = "技师对应的公众号openid")
    private String openid;

    @ApiModelProperty(value = "技师接单的纬度")
    private Double lat;
    @ApiModelProperty(value = "技师接单的经度")
    private Double lng;



    /**
     * 评论信息
     */
    @TableField(exist = false)
    private HmComm comm = new HmComm();

    /**
     * 技师信息
     */
    @TableField(exist = false)
    private HmTechnician technician = new HmTechnician();


    /**
     * 客户信息
     */
    @TableField(exist = false)
    private HmUserAddr userAddr = new HmUserAddr();


    /**
     * 项目信息
     */
    @TableField(exist = false)
    private HmProject hmProject = new HmProject();

    @TableField(exist = false)
    private List<HmProject> projectList = new ArrayList<>();

    /**
     * 优惠券id
     */
    @TableField(exist = false)
    private String couponId;

    /**
     * 技师上传的图片
     */
    @TableField(exist = false)
    private List<HmOrderImg> hmOrderImgList = new ArrayList<>();
}
